package task3.rules

import org.apache.spark.internal.Logging
import org.apache.spark.sql.SparkSession
import org.apache.spark.sql.catalyst.plans.logical.LogicalPlan
import org.apache.spark.sql.catalyst.rules.Rule

case class MyRule(spark: SparkSession) extends Rule[LogicalPlan] with Logging {

  override def apply(plan: LogicalPlan): LogicalPlan = {
    logWarning("优化规则， noop by zkx")
    logWarning(
      s"""
         |=== Applying Rule $ruleName ===
       """.stripMargin)
    plan
  }
}
